package com.jbm.jbmsupplier.util;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-02-23.
 */
////@Entity
////@Table(name = "geo_info", schema = "", catalog = "jbmcore")
////@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class GeoInfoEntity extends ICtrl implements Serializable {
    private static final long serialVersionUID = -4954601404176920165L;
    private int giId;
    private String giCode;
    private String giName;
    private String giFullname;
    private Integer longitude;
    private Integer latitude;
    private String type;
    private String status;
    private Timestamp createDate;
    private int createId;
    private Timestamp expireDate;
    private Timestamp closeDate;
    private Integer closeId;
    private String giFulltext;

    private InfoGeoPriceEntity infoGeoPriceEntity;

    private Integer prevId;
    private String prevCode;

    public   GeoInfoEntity(){}
    public   GeoInfoEntity(int giId){
        this.giId = giId;
    }
    public   GeoInfoEntity(String method, int gi_id, int prev_id,   String type){
        this.giId = gi_id;
        this.prevId=prev_id;
        this.type=type;
         this.method=method;
    }

    ////@Id
    ////@Column(name = "gi_id")
    public int getGiId() {
        return giId;
    }

    public void setGiId(int giId) {
        this.giId = giId;
    }

    ////@Basic
    ////@Column(name = "gi_code")
    public String getGiCode() {
        return giCode;
    }

    public void setGiCode(String giCode) {
        this.giCode = giCode;
    }

    ////@Basic
    ////@Column(name = "gi_name")
    public String getGiName() {
        return giName;
    }

    public void setGiName(String giName) {
        this.giName = giName;
    }

    ////@Basic
    ////@Column(name = "gi_fullname")
    public String getGiFullname() {
        return giFullname;
    }

    public void setGiFullname(String giFullname) {
        this.giFullname = giFullname;
    }

    ////@Basic
    ////@Column(name = "longitude")
    public Integer getLongitude() {
        return longitude;
    }

    public void setLongitude(Integer longitude) {
        this.longitude = longitude;
    }

    ////@Basic
    ////@Column(name = "latitude")
    public Integer getLatitude() {
        return latitude;
    }

    public void setLatitude(Integer latitude) {
        this.latitude = latitude;
    }

    ////@Basic
    ////@Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    ////@Basic
    ////@Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    ////@Basic
    ////@Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    ////@Basic
    ////@Column(name = "create_id")
    public int getCreateId() {
        return createId;
    }

    public void setCreateId(int createId) {
        this.createId = createId;
    }

    ////@Basic
    ////@Column(name = "expire_date")
    public Timestamp getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Timestamp expireDate) {
        this.expireDate = expireDate;
    }

    ////@Basic
    ////@Column(name = "close_date")
    public Timestamp getCloseDate() {
        return closeDate;
    }

    public void setCloseDate(Timestamp closeDate) {
        this.closeDate = closeDate;
    }

    ////@Basic
    ////@Column(name = "close_id")
    public Integer getCloseId() {
        return closeId;
    }

    public void setCloseId(Integer closeId) {
        this.closeId = closeId;
    }

    ////@Basic
    ////@Column(name = "gi_fulltext")
    public String getGiFulltext() {
        return giFulltext;
    }

    public void setGiFulltext(String giFulltext) {
        this.giFulltext = giFulltext;
    }

    ////@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        GeoInfoEntity that = (GeoInfoEntity) o;

        if (createId != that.createId) return false;
        if (giId != that.giId) return false;
        if (closeDate != null ? !closeDate.equals(that.closeDate) : that.closeDate != null) return false;
        if (closeId != null ? !closeId.equals(that.closeId) : that.closeId != null) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (expireDate != null ? !expireDate.equals(that.expireDate) : that.expireDate != null) return false;
        if (giCode != null ? !giCode.equals(that.giCode) : that.giCode != null) return false;
        if (giFullname != null ? !giFullname.equals(that.giFullname) : that.giFullname != null) return false;
        if (giFulltext != null ? !giFulltext.equals(that.giFulltext) : that.giFulltext != null) return false;
        if (giName != null ? !giName.equals(that.giName) : that.giName != null) return false;
        if (latitude != null ? !latitude.equals(that.latitude) : that.latitude != null) return false;
        if (longitude != null ? !longitude.equals(that.longitude) : that.longitude != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;

        return true;
    }

    ////@Override
    public int hashCode() {
        int result = giId;
        result = 31 * result + (giCode != null ? giCode.hashCode() : 0);
        result = 31 * result + (giName != null ? giName.hashCode() : 0);
        result = 31 * result + (giFullname != null ? giFullname.hashCode() : 0);
        result = 31 * result + (longitude != null ? longitude.hashCode() : 0);
        result = 31 * result + (latitude != null ? latitude.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + createId;
        result = 31 * result + (expireDate != null ? expireDate.hashCode() : 0);
        result = 31 * result + (closeDate != null ? closeDate.hashCode() : 0);
        result = 31 * result + (closeId != null ? closeId.hashCode() : 0);
        result = 31 * result + (giFulltext != null ? giFulltext.hashCode() : 0);
        return result;
    }

    ////@Transient
    public InfoGeoPriceEntity getInfoGeoPriceEntity() {
        return infoGeoPriceEntity;
    }


    public void setInfoGeoPriceEntity(InfoGeoPriceEntity infoGeoPriceEntity) {
        this.infoGeoPriceEntity = infoGeoPriceEntity;
    }

    ////@Transient
    public Integer getPrevId() {
        return prevId;
    }

    public void setPrevId(Integer prevId) {
        this.prevId = prevId;
    }

    ////@Transient
    public String getPrevCode() {
        return prevCode;
    }

    public void setPrevCode(String prevCode) {
        this.prevCode = prevCode  ;
    }
 }


